package y2017.date0326am.强转对象;

public class Person extends Biology {
    private String species;
    private boolean sex;

    public Person() {
        setSpecies("生物");
    }

    @Override
    protected void setSpecies(String species) {
        this.species = species;
    }

    @Override
    protected String getSpecies() {
        return species;
    }

    public boolean getSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Person [species=" + species + ", sex=" + sex + ", getSpecies()="
                + getSpecies() + ", getSex()=" + getSex() + ", getName()="
                + getName() + ", getYear()=" + getYear() + ", getClass()="
                + getClass() + ", hashCode()=" + hashCode() + ", toString()="
                + super.toString() + "]";
    }
}
